<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .c1{
            width: 300px;
            height: 300px;
            background-color: gray;
        }

        .c2{
            /*边框*/
            border: 1px solid red;
            width: 800px;
            height: 600px;
            /*背景图片*/
            /*background-image: url("12背景图片.png");*/
            /*水平方向填充*/
            /*background-repeat: repeat-x;*/
            /*垂直方向填充*/
            /*background-repeat: repeat-y;*/
            /*默认全部填充*/
            /*不填充*/
            /*background-repeat: no-repeat;*/
            /*背景图片位置调整*/
            /*background-position: bottom right;*/
            /*简写*/
            background: url("12背景图片.png") no-repeat center left;
        }
    </style>
</head>
<body>

<!--背景颜色-->
<div class="c1"></div>

<!--背景图片-->
<div class="c2"></div>

</body>
</html>